﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="UserSearchResults.aspx.vb" Inherits="Training.UserSearchResults" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training - Training:: User Search Results</title>
<link rel="Stylesheet" type="text/css" media="screen" href="../css/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="ctr">
        <h2>User Search Results</h2>
        
        <div style="width:750px;text-align:left;margin:0 auto;" class="text">
            <asp:GridView ID="gvResults" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" DataKeyNames="UserID" DataSourceID="dsSchResults" 
                Width="100%" EmptyDataText="No users match search criteria">
                <RowStyle CssClass="row1" />
                <EmptyDataRowStyle CssClass="row1" />
                <Columns>
                    <asp:BoundField DataField="UserID" HeaderText="User ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="UserID" >
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="UserName" HeaderText="User Name" ReadOnly="True" 
                        SortExpression="UserName" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CompanyName" HeaderText="Company Name" 
                        SortExpression="CompanyName" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="Active" HeaderText="Active" 
                        SortExpression="Active" >
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="CreatedDate" HeaderText="CreatedDate" 
                        SortExpression="CreatedDate" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:HyperLinkField DataNavigateUrlFields="UserID,UserName" 
                        DataNavigateUrlFormatString="DeleteGroupUser.aspx?uid={0}&amp;unm={1}" HeaderText="Delete" 
                        Text="delete">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="UserID,UserName" 
                        DataNavigateUrlFormatString="EditGroupUser.aspx?uid={0}&amp;unm={1}" HeaderText="Edit User" 
                        Text="edit">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="UserID,UserName" 
                        DataNavigateUrlFormatString="ViewUserResults.aspx?uid={0}&amp;unm={1}" HeaderText="Results" 
                        Text="view">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                </Columns>
                <PagerStyle CssClass="row1" />
                <HeaderStyle CssClass="rowHead" />
                <AlternatingRowStyle CssClass="row2" />
            </asp:GridView>
        </div>
        
        <br />
        <p><a href="Users.aspx">Manage Group Users</a>
        &nbsp; - &nbsp;
        <a href="Default.aspx">Admin Main</a></p>
        
    </div>
    
    <!-- data sources -->
    
    <asp:SqlDataSource ID="dsSchResults" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Conn %>" 
        SelectCommand="proc_SearchForUserByAll" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:QueryStringParameter Name="sch" QueryStringField="sch" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
